<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>学生宿舍信息</title>
    <style>
        * {
            text-decoration: none;
            color: inherit;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            box-sizing: border-box;
        }
        body {
            background: url('https://www.fjpit.edu.cn/_upload/article/images/85/0a/ace6605245f7aa03c4f70daef565/4859390e-bc87-42e1-896f-44386bc14740.png') no-repeat center center fixed;
            background-size: cover;
            margin: 0;
            padding: 0;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            background-blend-mode: overlay;
        }
        .main {
            width: 85%;
            max-width: 1400px;
            background: rgba(255, 255, 255, 0.85);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
            border-radius: 20px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }
        .header, .footer {
            background: #0073e6;
            color: white;
            padding: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .header {
            border-top-left-radius: 20px;
            border-top-right-radius: 20px;
        }
        .footer {
            background: #0073e6;
            color: white;
            padding: 20px;
            text-align: center;
            border-bottom-left-radius: 20px;
            border-bottom-right-radius: 20px;
            font-size: 1.1em;
            justify-content: center;
        }

        .footer img{
            width: 270px;
            height: 50px;

        }
        .header a, .footer a {
            color: white;
            margin-left: 30px;
            font-weight: bold;
        }
        .content {
            width: 969px;
            height: 445px;
            margin: 0 auto;
            padding: 20px;
            text-align: center;
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        .content h2 {
            margin-top: 50px;
            color: #0073e6;
            font-size: 2.5em;
        }
        .menu {
            display: flex;
            justify-content: center;
        }
        .menu a {
            background: #0073e6;
            color: white;
            padding: 10px 20px;
            border-radius: 10px;
            text-decoration: none;
            transition: background 0.3s, transform 0.3s;
            font-size: 1em;
            margin: 0 10px 0 10px;
        }
        .menu a:hover {
            background: #005bb5;
            transform: scale(1.05);
        }
        .search-box {
            margin: 20px auto;
            text-align: center;
        }
        .search-box input[type="text"] {
            width: 60%;
            padding: 10px;
            font-size: 1em;
            border: 2px solid #0073e6;
            border-radius: 10px;
        }
        .form-container {
            margin: 10px 0;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .form-container form {
            width: 50%;
            background: #f7f7f7;
            border-radius: 10px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        }
        .form-container form input[type="text"], .form-container form input[type="radio"], .form-container form button {
            margin: 10px 0;
            padding: 10px;
            font-size: 1em;
        }
        .form-container form button {
            width: 100px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
        }
        .form-container .add {
            background: #005bb5;
            color: white;
        }
        .form-container .new {
            background: #005bb5;
            color: white;
        }
    </style>
</head>
<body>
<div class="main">
    <div class="header">
        <p>欢迎您，管理员</p>
    </div>
    <div class="content">

        <h2>修改宿舍信息</h2>
        <div class="menu">
            <a href="main.jsp">返回系统</a>
            <a href="empList">宿舍列表</a>
        </div>
        <div class="form-container">
            <form action="updateEmp" method="post">
                <input type="hidden" name="id" value="${employee.id}">
                宿舍：<input name="empName" value="${employee.empName}" type="text" /><br />
                是否满员：
                <c:choose>
                    <c:when test="${employee.empGender == '是'}">
                        <label><input name="empGender" type="radio" value="是" checked/>是</label>
                    </c:when>
                    <c:otherwise>
                        <label><input name="empGender" type="radio" value="是">是</label>
                    </c:otherwise>
                </c:choose>
                <c:choose>
                    <c:when test="${employee.empGender == '否'}">
                        <label><input type="radio" name="empGender" value="否" checked/>否</label><br />
                    </c:when>
                    <c:otherwise>
                        <label><input type="radio" name="empGender" value="否">否</label><br />
                    </c:otherwise>
                </c:choose>
                人数：<input value="${ employee.empSalary}" name="empSalary" type="text" /><br>
                <button class="add">修改</button>
                <button class="new" type="reset">重置</button>
            </form>
        </div>
    </div>

</div>
</body>
</html>
